treeview: Lower the duration of validation iterations
authorBastien Nocera <hadess@hadess.net>
Sat, 22 Mar 2014 11:47:55 +0000 (12:47 +0100)
committerBastien Nocera <hadess@hadess.net>
Thu, 27 Mar 2014 12:02:43 +0000 (13:02 +0100)
commitd6f9247f530dc914563faf1867181a2050481534
treede646ae42def8b99a3dfd9a708aaa113152fe84a
parent5c019bde1518cfda59797b7c0f74094cd67d96bf
treeview: Lower the duration of validation iterations

GTK_TREE_VIEW_TIME_MS_PER_IDLE is currently 30 milliseconds, meaning
that validate_rows will validate rows up until all the validations have
taken over 30 msecs. So it's likely to block redrawing via the clock
frame update mechanism, as that tops at 16.66 milliseconds per frame
(1/60th of a second).

Stop validating rows if we've spent more than 3/5 of our allotted budget
for inter-frame processing, so as to avoid blocking.

In the future, we would probably want to calculate how long we would
have left until the next frame, especially if higher priority idles
and timeouts have already consumed a portion of that allotted time.

https://bugzilla.gnome.org/show_bug.cgi?id=726871
gtk/gtktreeview.c